<?php

namespace App\Http\Controllers;


class BaseController extends Controller
{
    protected function _success(array $data = array())
    {
        return response()->json(['code' => 0, 'msg' => 'success', 'data' => $data]);
    }

    protected function _failed($msg, $code = 1)
    {
        return response()->json(['code' => $code, 'msg' => $msg]);
    }

}
